package proj1.ui;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;

/**
 * A view for the DB.  Instantiate this to begin.
 * @author krosener
 *
 */

public class MainMenu extends JPanel {
	private static final long serialVersionUID = -6507430624966226042L;

	public MainMenu(final ApplicationFrame mainFrame){
		super();
		
		JButton radiators = new JButton("Radiators");
		radiators.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent arg0) {
				mainFrame.setContentPane(new RadiatorSearch(mainFrame));
			}
		});
		
		
		
		setLayout(new BorderLayout());
		add(radiators, BorderLayout.NORTH);
	}
	
	@Override
	public String toString(){
		return "Main Menu";
	}
}
